The present invention, in some embodiments thereof, relates to computer development tools and, more particularly, but not exclusively, to context data management across asynchronous callback procedures.
Contemporary procedural programming languages and/or software platforms such as Node.js, Tornado, Twisted, libevent, EventMachine, vibe.d and others may use event-driven, asynchronous input and/or output, referred to herein as I/O, in order to minimize overhead and maximize scalability. In this setting, the application control flow may consist of a callback flow originating from invocation of a procedure in a set of processor instructions determined by the application. The callback flow originating procedure may be any user-defined procedure, third party procedure and/or native application programming interface procedure, referred to herein as an original procedure, but may also be referred to as an original procedure, unmodified procedure, callback flow originating procedure, and the like.
The execution of the original procedure may initiate the later execution of one or more asynchronous callback procedures, usually executed by a single processor thread, one callback scheduling the next one or more callback procedures as needed. The later execution of these one or more asynchronous callback procedures may be referred to as a callback flow and/or control flow. In this context the original procedure may refer to the procedure invocation that produced the callback flow. The asynchronous callback procedure that is later executed may be referred to in this application as the original callback, asynchronous callback and/or original callback procedure. The term original callback and the like may refer to the definition and/or declaration of the callback procedure, the function pointer to the callback procedure, the reference to the callback procedure, and the like, depending on the context the term is used in. It is noted that the execution of the application program itself and/or original procedure may be completed a long time before the callback flow completes execution. As may be defined in procedural programming languages, the terms procedure, function, subroutine, routine and the like refer to execution of defined groups of processor instructions, and may be used interchangeably in this application.